{% extends 'base.html' %}
{% block title %}搜索{% endblock %}


{% block head %}
<link rel="stylesheet" href="{{ url_for('static', filename='css/search.css') }}">
{% endblock %}


{% block main %}
    <ul class="post-list">
        {% for post in posts %}
            <li>
                <div class="post-group">
                    <p class="post-title"><h4><a href="/detail/{{ post.id }}">{{ post.title }}</a></h4></p>
                    <p class="post-content">{{ post.content }}</p>
                    <div class="post-info">
                       <span class="post-author">{{ post.author.username }}</span>
                       <span class="post-time">{{ post.time }}</span>
                    </div>
                </div>
            </li>
        {% endfor %}
    </ul>
{% endblock %}